package com.shawn.ui;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.shawn.mobliesafe.R;


/**
 * Created by shawn on 2016/4/11.
 */
public class SettingClickView extends RelativeLayout{

    private TextView tv_setting_des;
    private TextView tv_setting_title;

    public SettingClickView(Context context) {
        super(context);
        init();
    }

    public SettingClickView(Context context, AttributeSet attrs) {
        super(context, attrs);
        init();
    }

    public SettingClickView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        init();
    }

    private void init() {
        View view = View.inflate(getContext(), R.layout.settingclickview,this);
        tv_setting_title = (TextView)view.findViewById(R.id.tv_setting_title);
        tv_setting_des = (TextView)view.findViewById(R.id.tv_setting_des);
    }

    /**
     * 设置标题的方法
     */
    public void setTitle(String title){
        tv_setting_title.setText(title);
    }
    /**
     * 设置描述信息的方法
     */
    public void setDes(String des){
        tv_setting_des.setText(des);
    }

}
